This invention relates generally to digital imaging devices and specifically to automatic and selective intensity resolution enhancement of a digital image.
Digital imaging devices are becoming increasingly popular in a variety of applications, including digital cameras, fingerprint recognition, digital scanners and copiers, and the like. A typical prior art digital imaging devices are based on charge coupled device (CCD) technology. CCD devices have an array of CCD cells, each cell comprising a pixel. Each CCD pixel outputs a voltage signal proportionate to the intensity of light impinging upon the cell. This analog voltage signal can be converted to a digital signal for further processing, digital filtering, storage and the like. As is well known in the art, a two dimensional digital image can be constructed from the voltage signals output from a two-dimensional array of CCD cells, commonly referred to as a sensor array.
Depending upon ambient conditions such as temperature and lighting and the characteristics of the CCD array, the resulting image may have poor resolution. Poor image resolution could result from, very bright light impinging upon sensor array, in which case the resulting image might appear washed out, or low light conditions, in which case the resulting image might appear dark and indistinct. Another contributor to poor image quality might be insufficient contrast between light and dark pixels, resulting in a blurred or faded image. While digital signal processing may be employed to compensate for certain image quality problems, considerable image improvement can be obtained by adjusting how the analog voltage signal coming from the sensor array is handled prior to being input to the analog to digital converter.
The need exists, therefore, for a method of adjusting the digital imaging common technique for improving image resolution is to increase the contrast lighting conditions.
In one aspect, the present invention provides, a method of automatic gain control in an image processor having a programmable amplifier, the programmable amplifier having a reference voltage input and a signal input and a programmable gain value and having a differential output coupled to an analog to digital converter, the analog to digital converter outputting a digital code corresponding to the output of the programmable amplifier, the method comprising reading a frame of luminance data and determining an average luminance value of the frame and the digital code output by the ADC corresponding to average luminance value. The method further comprises calculating a reference voltage that will cause the digital code output by the ADC to be at a target value when the signal input to the programmable amplifier is set to the average luminance value and a gain that will cause the digital output code of the ADC to be at the target value when the signal input to the programmable amplifier is set to the average luminance value. The method also includes setting the reference voltage and the gain to the calculated values and reading the next frame.
In another aspect, the present invention provides an image processor comprising a differential amplifier receiving as input a luminance signal and a reference voltage signal and outputting an amplified differential signal, a differential analog to digital converter (ADC) receiving as input said amplified differential signal and outputting a digital signal corresponding to said amplified differential signal, a programmable voltage source outputting said reference voltage signal, a digital averager receiving said digital signal and outputting an average luminance value, and a digital signal controller receiving said luminance brightness value and outputting a gain control signal to said differential amplifier and a reference voltage control signal to said programmable voltage source, the gain control signal and the reference voltage control signal being determined from the difference in (i) the digital signal of the analog to digital converter when the luminance input is at the average brightness value and (2) a desired digital signal.
In another aspect, the present invention provides an automatic gain control circuit comprising an amplifier receiving as input a frame of a luminance signal and a reference voltage signal, and outputting a differential signal corresponding to the difference between the luminance signal and the reference voltage signal. The amplifier amplifies the difference under control of a gain control signal. The circuit also includes a differential analog to digital converter (ADC) receiving the signal output by the amplifier and outputting a digital signal corresponding to differential output of the amplifier, means for calculating an average luminance value for the frame, means for comparing the digital signal output by the ADC when the luminance signal input to the amplifier is at the average luminance value to a desired digital output and generating a difference signal, means for adjusting the reference voltage signal in response to the difference signal; and means for adjusting the gain control signal in response to the difference signal.